home *** CD-ROM | disk | FTP | other *** search
- Path: news.interlog.com!news
- From: object@interlog.com (Nicholas Scott)
- Newsgroups: comp.lang.c++
- Subject: Re: Pure Virtual Destructor Question
- Date: Sat, 10 Feb 1996 16:30:03 GMT
- Organization: The Object Group
- Message-ID: <311cc66a.2683598@news.interlog.com>
- References: <4fecq0$k4e@news4.digex.net> <4fg2s5$r02@cnn.exu.ericsson.se> <4fgp0o$759@news4.digex.net>
- NNTP-Posting-Host: object.interlog.com
- X-Newsreader: Forte Agent .99d/32.182
-
- ell@access1.digex.net (Ell) wrote:
-
- >Mickey Williams 66753 (ebumow@ebu.ericsson.com) wrote:
- >: In article k4e@news4.digex.net, ell@access4.digex.net (Ell) writes:
- >:
- >: >Immediately above you are logically "defining" your "pure virtual"
- >: >destructor "inside the class where it is "declared" as a pure virtual
- >: >function. It is _illegal_ to logically, or physically "define" a pure
- >: >virtual function in the class it is "declared" in. A pure virtual should
-
- Nonsense... implementations can be supplied for pure virtuals...
- further they can also be invoked.
-
- >: >only be defined in classes derived from the class where the pure virtual
- >: >is declared. Only derived classes should "do some destructor stuff".
-
- This last sentence is also false. Virtual destructors result in
- chained calls to all dtors.
-
- >: This is not true in the case of pure virtual destructors. You must
- >: always provide a function body for a virtual dtor, even if it
- >: is pure.
-
- Never really thought about pure virtual dtors before... beacause I
- always implement all dtors... even if they are empty... lets others
- know that at least you know dtors exist and that you have considered
- it for the class in question.
-
- >Another non-orthogonal, non-intuitive C++ ism. Oh well.
- >
- >Elliott
-
-